package ioperations;

import book.BookList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86136
 * Date: 2024-05-31
 * Time: 16:16
 */
public class ShowOperation implements IOperations{

    @Override
    public void work(BookList bookList) {
        System.out.println("展示图书");
        if(bookList.usedSize == 0) {
            System.out.println("----------");
            System.out.println("---null---");
            System.out.println("----------");
            return;
        }
        for (int i = 0; i < bookList.usedSize; i++) {
            System.out.println(bookList.books[i].toString());
        }

    }
}
